Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding file_temp_path to settings #144

Merged
merged 7 commits into from
Jan 21, 2020
Merged

Adding file_temp_path to settings #144

merged 7 commits into from
Jan 21, 2020

Conversation

shaal
Copy link
Contributor

@shaal shaal commented Dec 6, 2019

Per comment in https://www.drupal.org/project/drupal/releases/8.8.0, under "Other important update information".

The temporary file path is now a setting in settings.php, and is no longer stored in configuration. If your site is not using /tmp, you must update settings.php before running database updates:

$settings['file_temp_path'] = '/path/to/your/temporary/folder';

Original d.o issue: https://www.drupal.org/project/drupal/issues/3039026

@shaal shaal requested a review from becw December 6, 2019 15:04
@shaal shaal self-assigned this Dec 6, 2019
@@ -138,6 +138,7 @@
<property name="drupal.site.database.database" value="${build.site}" />
<property name="drupal.site.settings.file_public_path" value="sites/${drupal.site.dir}/files" />
<property name="drupal.site.settings.file_private_path" value="../artifacts/private/${drupal.site.dir}" />
<property name="drupal.site.settings.file_temp_path" value="{$_ENV['TEMP']}" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this {$_ENV['TEMP']} environment variable is specific to Acquia (docs).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@becw should we add a specific tmp for every vendor (acquia / pantheon)?
Is there a better way to do it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each vendor does their own handling of this, so I think that we can customize this behavior in the settings.*.php templates, rather than providing it as a setting (because then everybody would have to figure out how it should be set for whatever provider they're using). The temp directory is generally an absolute path, rather than a relative path like the public and private files directories, so it tends to be a bit more host-specific.

For example, Pantheon already handles the temp directory as part of its scaffolding: https://pantheon.io/docs/tmp

For Platform.sh, the temp directory is specified in the .platform.app.yaml file (/tmp), so we can use that.

Even the settings.build.php should be fine to hard-code it, since projects can edit that template as necessary (it's copied to each project at .the-build/drupal/settings.build.php).

@becw
Copy link
Member

becw commented Dec 6, 2019

This is the right direction! We'll also need to cover the other config files.

@shaal shaal requested a review from becw December 7, 2019 03:27
@becw becw merged commit 8f5d92b into develop Jan 21, 2020
@becw becw deleted the add-tmp-path-in-settings branch January 21, 2020 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants